package registnet.dao;


import java.math.BigDecimal;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Date;
import java.util.Collections;
import java.util.List;

import org.apache.commons.lang.ObjectUtils;
import org.apache.torque.TorqueException;
import org.apache.torque.om.BaseObject;
import org.apache.torque.om.ComboKey;
import org.apache.torque.om.DateKey;
import org.apache.torque.om.NumberKey;
import org.apache.torque.om.ObjectKey;
import org.apache.torque.om.SimpleKey;
import org.apache.torque.om.StringKey;
import org.apache.torque.om.Persistent;
import org.apache.torque.util.Criteria;
import org.apache.torque.util.Transaction;


/**
 * This class was autogenerated by Torque on:
 *
 * [Tue Jun 30 14:38:16 PDT 2009]
 *
 * You should not use this class directly.  It should not even be
 * extended all references should be to StudentLog
 */
public abstract class BaseStudentLog extends BaseObject
{
    /** The Peer class */
    private static final StudentLogPeer peer =
        new StudentLogPeer();

        
    /** The value for the studentLogId field */
    private int studentLogId;
      
    /** The value for the action field */
    private int action;
      
    /** The value for the year field */
    private int year;
      
    /** The value for the month field */
    private int month;
      
    /** The value for the day field */
    private int day;
      
    /** The value for the hour field */
    private int hour;
      
    /** The value for the minute field */
    private String minute;
      
    /** The value for the second field */
    private String second;
      
    /** The value for the studentNumber field */
    private String studentNumber;
      
    /** The value for the firstName field */
    private String firstName;
      
    /** The value for the middleName field */
    private String middleName;
      
    /** The value for the lastName field */
    private String lastName;
      
    /** The value for the sex field */
    private String sex;
      
    /** The value for the birthDate field */
    private String birthDate;
                                          
    /** The value for the civilStatus field */
    private int civilStatus = 1;
                                                
    /** The value for the residentialAddress field */
    private String residentialAddress = "";
                                                
    /** The value for the collegeAddress field */
    private String collegeAddress = "";
                                                
    /** The value for the father field */
    private String father = "";
                                                
    /** The value for the mother field */
    private String mother = "";
                                                
    /** The value for the guardian field */
    private String guardian = "";
      
    /** The value for the guardianContactNumber field */
    private String guardianContactNumber;
      
    /** The value for the guardianAddress field */
    private String guardianAddress;
      
    /** The value for the guardianRelation field */
    private String guardianRelation;
      
    /** The value for the guardianEmail field */
    private String guardianEmail;
                                          
    /** The value for the isRGEP field */
    private int isRGEP = 1;
      
    /** The value for the zipcode field */
    private int zipcode;
      
    /** The value for the telephoneNumber field */
    private String telephoneNumber;
      
    /** The value for the cellphoneNumber field */
    private String cellphoneNumber;
                                                
    /** The value for the highSchool field */
    private String highSchool = "";
                                          
    /** The value for the highSchoolGrade field */
    private double highSchoolGrade = 0.00;
      
    /** The value for the email field */
    private String email;
                                          
    /** The value for the sTFAPBracket field */
    private int sTFAPBracket = 9;
      
    /** The value for the signature field */
    private byte[] signature;
      
    /** The value for the adviser field */
    private String adviser;
      
    /** The value for the citizenship field */
    private int citizenship;
      
    /** The value for the country field */
    private String country;
      
    /** The value for the curriculumCode field */
    private String curriculumCode;
      
    /** The value for the photo field */
    private byte[] photo;
  
    
    /**
     * Get the StudentLogId
     *
     * @return int
     */
    public int getStudentLogId()
    {
        return studentLogId;
    }

                        
    /**
     * Set the value of StudentLogId
     *
     * @param v new value
     */
    public void setStudentLogId(int v) 
    {
    
                  if (this.studentLogId != v)
              {
            this.studentLogId = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Action
     *
     * @return int
     */
    public int getAction()
    {
        return action;
    }

                        
    /**
     * Set the value of Action
     *
     * @param v new value
     */
    public void setAction(int v) 
    {
    
                  if (this.action != v)
              {
            this.action = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Year
     *
     * @return int
     */
    public int getYear()
    {
        return year;
    }

                        
    /**
     * Set the value of Year
     *
     * @param v new value
     */
    public void setYear(int v) 
    {
    
                  if (this.year != v)
              {
            this.year = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Month
     *
     * @return int
     */
    public int getMonth()
    {
        return month;
    }

                        
    /**
     * Set the value of Month
     *
     * @param v new value
     */
    public void setMonth(int v) 
    {
    
                  if (this.month != v)
              {
            this.month = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Day
     *
     * @return int
     */
    public int getDay()
    {
        return day;
    }

                        
    /**
     * Set the value of Day
     *
     * @param v new value
     */
    public void setDay(int v) 
    {
    
                  if (this.day != v)
              {
            this.day = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Hour
     *
     * @return int
     */
    public int getHour()
    {
        return hour;
    }

                        
    /**
     * Set the value of Hour
     *
     * @param v new value
     */
    public void setHour(int v) 
    {
    
                  if (this.hour != v)
              {
            this.hour = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Minute
     *
     * @return String
     */
    public String getMinute()
    {
        return minute;
    }

                        
    /**
     * Set the value of Minute
     *
     * @param v new value
     */
    public void setMinute(String v) 
    {
    
                  if (!ObjectUtils.equals(this.minute, v))
              {
            this.minute = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Second
     *
     * @return String
     */
    public String getSecond()
    {
        return second;
    }

                        
    /**
     * Set the value of Second
     *
     * @param v new value
     */
    public void setSecond(String v) 
    {
    
                  if (!ObjectUtils.equals(this.second, v))
              {
            this.second = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the StudentNumber
     *
     * @return String
     */
    public String getStudentNumber()
    {
        return studentNumber;
    }

                        
    /**
     * Set the value of StudentNumber
     *
     * @param v new value
     */
    public void setStudentNumber(String v) 
    {
    
                  if (!ObjectUtils.equals(this.studentNumber, v))
              {
            this.studentNumber = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the FirstName
     *
     * @return String
     */
    public String getFirstName()
    {
        return firstName;
    }

                        
    /**
     * Set the value of FirstName
     *
     * @param v new value
     */
    public void setFirstName(String v) 
    {
    
                  if (!ObjectUtils.equals(this.firstName, v))
              {
            this.firstName = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the MiddleName
     *
     * @return String
     */
    public String getMiddleName()
    {
        return middleName;
    }

                        
    /**
     * Set the value of MiddleName
     *
     * @param v new value
     */
    public void setMiddleName(String v) 
    {
    
                  if (!ObjectUtils.equals(this.middleName, v))
              {
            this.middleName = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the LastName
     *
     * @return String
     */
    public String getLastName()
    {
        return lastName;
    }

                        
    /**
     * Set the value of LastName
     *
     * @param v new value
     */
    public void setLastName(String v) 
    {
    
                  if (!ObjectUtils.equals(this.lastName, v))
              {
            this.lastName = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Sex
     *
     * @return String
     */
    public String getSex()
    {
        return sex;
    }

                        
    /**
     * Set the value of Sex
     *
     * @param v new value
     */
    public void setSex(String v) 
    {
    
                  if (!ObjectUtils.equals(this.sex, v))
              {
            this.sex = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the BirthDate
     *
     * @return String
     */
    public String getBirthDate()
    {
        return birthDate;
    }

                        
    /**
     * Set the value of BirthDate
     *
     * @param v new value
     */
    public void setBirthDate(String v) 
    {
    
                  if (!ObjectUtils.equals(this.birthDate, v))
              {
            this.birthDate = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the CivilStatus
     *
     * @return int
     */
    public int getCivilStatus()
    {
        return civilStatus;
    }

                        
    /**
     * Set the value of CivilStatus
     *
     * @param v new value
     */
    public void setCivilStatus(int v) 
    {
    
                  if (this.civilStatus != v)
              {
            this.civilStatus = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the ResidentialAddress
     *
     * @return String
     */
    public String getResidentialAddress()
    {
        return residentialAddress;
    }

                        
    /**
     * Set the value of ResidentialAddress
     *
     * @param v new value
     */
    public void setResidentialAddress(String v) 
    {
    
                  if (!ObjectUtils.equals(this.residentialAddress, v))
              {
            this.residentialAddress = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the CollegeAddress
     *
     * @return String
     */
    public String getCollegeAddress()
    {
        return collegeAddress;
    }

                        
    /**
     * Set the value of CollegeAddress
     *
     * @param v new value
     */
    public void setCollegeAddress(String v) 
    {
    
                  if (!ObjectUtils.equals(this.collegeAddress, v))
              {
            this.collegeAddress = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Father
     *
     * @return String
     */
    public String getFather()
    {
        return father;
    }

                        
    /**
     * Set the value of Father
     *
     * @param v new value
     */
    public void setFather(String v) 
    {
    
                  if (!ObjectUtils.equals(this.father, v))
              {
            this.father = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Mother
     *
     * @return String
     */
    public String getMother()
    {
        return mother;
    }

                        
    /**
     * Set the value of Mother
     *
     * @param v new value
     */
    public void setMother(String v) 
    {
    
                  if (!ObjectUtils.equals(this.mother, v))
              {
            this.mother = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Guardian
     *
     * @return String
     */
    public String getGuardian()
    {
        return guardian;
    }

                        
    /**
     * Set the value of Guardian
     *
     * @param v new value
     */
    public void setGuardian(String v) 
    {
    
                  if (!ObjectUtils.equals(this.guardian, v))
              {
            this.guardian = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the GuardianContactNumber
     *
     * @return String
     */
    public String getGuardianContactNumber()
    {
        return guardianContactNumber;
    }

                        
    /**
     * Set the value of GuardianContactNumber
     *
     * @param v new value
     */
    public void setGuardianContactNumber(String v) 
    {
    
                  if (!ObjectUtils.equals(this.guardianContactNumber, v))
              {
            this.guardianContactNumber = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the GuardianAddress
     *
     * @return String
     */
    public String getGuardianAddress()
    {
        return guardianAddress;
    }

                        
    /**
     * Set the value of GuardianAddress
     *
     * @param v new value
     */
    public void setGuardianAddress(String v) 
    {
    
                  if (!ObjectUtils.equals(this.guardianAddress, v))
              {
            this.guardianAddress = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the GuardianRelation
     *
     * @return String
     */
    public String getGuardianRelation()
    {
        return guardianRelation;
    }

                        
    /**
     * Set the value of GuardianRelation
     *
     * @param v new value
     */
    public void setGuardianRelation(String v) 
    {
    
                  if (!ObjectUtils.equals(this.guardianRelation, v))
              {
            this.guardianRelation = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the GuardianEmail
     *
     * @return String
     */
    public String getGuardianEmail()
    {
        return guardianEmail;
    }

                        
    /**
     * Set the value of GuardianEmail
     *
     * @param v new value
     */
    public void setGuardianEmail(String v) 
    {
    
                  if (!ObjectUtils.equals(this.guardianEmail, v))
              {
            this.guardianEmail = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the IsRGEP
     *
     * @return int
     */
    public int getIsRGEP()
    {
        return isRGEP;
    }

                        
    /**
     * Set the value of IsRGEP
     *
     * @param v new value
     */
    public void setIsRGEP(int v) 
    {
    
                  if (this.isRGEP != v)
              {
            this.isRGEP = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Zipcode
     *
     * @return int
     */
    public int getZipcode()
    {
        return zipcode;
    }

                        
    /**
     * Set the value of Zipcode
     *
     * @param v new value
     */
    public void setZipcode(int v) 
    {
    
                  if (this.zipcode != v)
              {
            this.zipcode = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the TelephoneNumber
     *
     * @return String
     */
    public String getTelephoneNumber()
    {
        return telephoneNumber;
    }

                        
    /**
     * Set the value of TelephoneNumber
     *
     * @param v new value
     */
    public void setTelephoneNumber(String v) 
    {
    
                  if (!ObjectUtils.equals(this.telephoneNumber, v))
              {
            this.telephoneNumber = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the CellphoneNumber
     *
     * @return String
     */
    public String getCellphoneNumber()
    {
        return cellphoneNumber;
    }

                        
    /**
     * Set the value of CellphoneNumber
     *
     * @param v new value
     */
    public void setCellphoneNumber(String v) 
    {
    
                  if (!ObjectUtils.equals(this.cellphoneNumber, v))
              {
            this.cellphoneNumber = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the HighSchool
     *
     * @return String
     */
    public String getHighSchool()
    {
        return highSchool;
    }

                        
    /**
     * Set the value of HighSchool
     *
     * @param v new value
     */
    public void setHighSchool(String v) 
    {
    
                  if (!ObjectUtils.equals(this.highSchool, v))
              {
            this.highSchool = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the HighSchoolGrade
     *
     * @return double
     */
    public double getHighSchoolGrade()
    {
        return highSchoolGrade;
    }

                        
    /**
     * Set the value of HighSchoolGrade
     *
     * @param v new value
     */
    public void setHighSchoolGrade(double v) 
    {
    
                  if (this.highSchoolGrade != v)
              {
            this.highSchoolGrade = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Email
     *
     * @return String
     */
    public String getEmail()
    {
        return email;
    }

                        
    /**
     * Set the value of Email
     *
     * @param v new value
     */
    public void setEmail(String v) 
    {
    
                  if (!ObjectUtils.equals(this.email, v))
              {
            this.email = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the STFAPBracket
     *
     * @return int
     */
    public int getSTFAPBracket()
    {
        return sTFAPBracket;
    }

                        
    /**
     * Set the value of STFAPBracket
     *
     * @param v new value
     */
    public void setSTFAPBracket(int v) 
    {
    
                  if (this.sTFAPBracket != v)
              {
            this.sTFAPBracket = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Signature
     *
     * @return byte[]
     */
    public byte[] getSignature()
    {
        return signature;
    }

                        
    /**
     * Set the value of Signature
     *
     * @param v new value
     */
    public void setSignature(byte[] v) 
    {
    
                  if (!ObjectUtils.equals(this.signature, v))
              {
            this.signature = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Adviser
     *
     * @return String
     */
    public String getAdviser()
    {
        return adviser;
    }

                        
    /**
     * Set the value of Adviser
     *
     * @param v new value
     */
    public void setAdviser(String v) 
    {
    
                  if (!ObjectUtils.equals(this.adviser, v))
              {
            this.adviser = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Citizenship
     *
     * @return int
     */
    public int getCitizenship()
    {
        return citizenship;
    }

                        
    /**
     * Set the value of Citizenship
     *
     * @param v new value
     */
    public void setCitizenship(int v) 
    {
    
                  if (this.citizenship != v)
              {
            this.citizenship = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Country
     *
     * @return String
     */
    public String getCountry()
    {
        return country;
    }

                        
    /**
     * Set the value of Country
     *
     * @param v new value
     */
    public void setCountry(String v) 
    {
    
                  if (!ObjectUtils.equals(this.country, v))
              {
            this.country = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the CurriculumCode
     *
     * @return String
     */
    public String getCurriculumCode()
    {
        return curriculumCode;
    }

                        
    /**
     * Set the value of CurriculumCode
     *
     * @param v new value
     */
    public void setCurriculumCode(String v) 
    {
    
                  if (!ObjectUtils.equals(this.curriculumCode, v))
              {
            this.curriculumCode = v;
            setModified(true);
        }
    
          
              }
  
    /**
     * Get the Photo
     *
     * @return byte[]
     */
    public byte[] getPhoto()
    {
        return photo;
    }

                        
    /**
     * Set the value of Photo
     *
     * @param v new value
     */
    public void setPhoto(byte[] v) 
    {
    
                  if (!ObjectUtils.equals(this.photo, v))
              {
            this.photo = v;
            setModified(true);
        }
    
          
              }
  
         
                
    private static List fieldNames = null;

    /**
     * Generate a list of field names.
     *
     * @return a list of field names
     */
    public static synchronized List getFieldNames()
    {
        if (fieldNames == null)
        {
            fieldNames = new ArrayList();
              fieldNames.add("StudentLogId");
              fieldNames.add("Action");
              fieldNames.add("Year");
              fieldNames.add("Month");
              fieldNames.add("Day");
              fieldNames.add("Hour");
              fieldNames.add("Minute");
              fieldNames.add("Second");
              fieldNames.add("StudentNumber");
              fieldNames.add("FirstName");
              fieldNames.add("MiddleName");
              fieldNames.add("LastName");
              fieldNames.add("Sex");
              fieldNames.add("BirthDate");
              fieldNames.add("CivilStatus");
              fieldNames.add("ResidentialAddress");
              fieldNames.add("CollegeAddress");
              fieldNames.add("Father");
              fieldNames.add("Mother");
              fieldNames.add("Guardian");
              fieldNames.add("GuardianContactNumber");
              fieldNames.add("GuardianAddress");
              fieldNames.add("GuardianRelation");
              fieldNames.add("GuardianEmail");
              fieldNames.add("IsRGEP");
              fieldNames.add("Zipcode");
              fieldNames.add("TelephoneNumber");
              fieldNames.add("CellphoneNumber");
              fieldNames.add("HighSchool");
              fieldNames.add("HighSchoolGrade");
              fieldNames.add("Email");
              fieldNames.add("STFAPBracket");
              fieldNames.add("Signature");
              fieldNames.add("Adviser");
              fieldNames.add("Citizenship");
              fieldNames.add("Country");
              fieldNames.add("CurriculumCode");
              fieldNames.add("Photo");
              fieldNames = Collections.unmodifiableList(fieldNames);
        }
        return fieldNames;
    }

    /**
     * Retrieves a field from the object by name passed in as a String.
     *
     * @param name field name
     * @return value
     */
    public Object getByName(String name)
    {
          if (name.equals("StudentLogId"))
        {
                return new Integer(getStudentLogId());
            }
          if (name.equals("Action"))
        {
                return new Integer(getAction());
            }
          if (name.equals("Year"))
        {
                return new Integer(getYear());
            }
          if (name.equals("Month"))
        {
                return new Integer(getMonth());
            }
          if (name.equals("Day"))
        {
                return new Integer(getDay());
            }
          if (name.equals("Hour"))
        {
                return new Integer(getHour());
            }
          if (name.equals("Minute"))
        {
                return getMinute();
            }
          if (name.equals("Second"))
        {
                return getSecond();
            }
          if (name.equals("StudentNumber"))
        {
                return getStudentNumber();
            }
          if (name.equals("FirstName"))
        {
                return getFirstName();
            }
          if (name.equals("MiddleName"))
        {
                return getMiddleName();
            }
          if (name.equals("LastName"))
        {
                return getLastName();
            }
          if (name.equals("Sex"))
        {
                return getSex();
            }
          if (name.equals("BirthDate"))
        {
                return getBirthDate();
            }
          if (name.equals("CivilStatus"))
        {
                return new Integer(getCivilStatus());
            }
          if (name.equals("ResidentialAddress"))
        {
                return getResidentialAddress();
            }
          if (name.equals("CollegeAddress"))
        {
                return getCollegeAddress();
            }
          if (name.equals("Father"))
        {
                return getFather();
            }
          if (name.equals("Mother"))
        {
                return getMother();
            }
          if (name.equals("Guardian"))
        {
                return getGuardian();
            }
          if (name.equals("GuardianContactNumber"))
        {
                return getGuardianContactNumber();
            }
          if (name.equals("GuardianAddress"))
        {
                return getGuardianAddress();
            }
          if (name.equals("GuardianRelation"))
        {
                return getGuardianRelation();
            }
          if (name.equals("GuardianEmail"))
        {
                return getGuardianEmail();
            }
          if (name.equals("IsRGEP"))
        {
                return new Integer(getIsRGEP());
            }
          if (name.equals("Zipcode"))
        {
                return new Integer(getZipcode());
            }
          if (name.equals("TelephoneNumber"))
        {
                return getTelephoneNumber();
            }
          if (name.equals("CellphoneNumber"))
        {
                return getCellphoneNumber();
            }
          if (name.equals("HighSchool"))
        {
                return getHighSchool();
            }
          if (name.equals("HighSchoolGrade"))
        {
                return new Double(getHighSchoolGrade());
            }
          if (name.equals("Email"))
        {
                return getEmail();
            }
          if (name.equals("STFAPBracket"))
        {
                return new Integer(getSTFAPBracket());
            }
          if (name.equals("Signature"))
        {
                return getSignature();
            }
          if (name.equals("Adviser"))
        {
                return getAdviser();
            }
          if (name.equals("Citizenship"))
        {
                return new Integer(getCitizenship());
            }
          if (name.equals("Country"))
        {
                return getCountry();
            }
          if (name.equals("CurriculumCode"))
        {
                return getCurriculumCode();
            }
          if (name.equals("Photo"))
        {
                return getPhoto();
            }
          return null;
    }
    
    /**
     * Retrieves a field from the object by name passed in
     * as a String.  The String must be one of the static
     * Strings defined in this Class' Peer.
     *
     * @param name peer name
     * @return value
     */
    public Object getByPeerName(String name)
    {
          if (name.equals(StudentLogPeer.STUDENTLOGID))
        {
                return new Integer(getStudentLogId());
            }
          if (name.equals(StudentLogPeer.ACTION))
        {
                return new Integer(getAction());
            }
          if (name.equals(StudentLogPeer.YEAR))
        {
                return new Integer(getYear());
            }
          if (name.equals(StudentLogPeer.MONTH))
        {
                return new Integer(getMonth());
            }
          if (name.equals(StudentLogPeer.DAY))
        {
                return new Integer(getDay());
            }
          if (name.equals(StudentLogPeer.HOUR))
        {
                return new Integer(getHour());
            }
          if (name.equals(StudentLogPeer.MINUTE))
        {
                return getMinute();
            }
          if (name.equals(StudentLogPeer.SECOND))
        {
                return getSecond();
            }
          if (name.equals(StudentLogPeer.STUDENTNUMBER))
        {
                return getStudentNumber();
            }
          if (name.equals(StudentLogPeer.FIRSTNAME))
        {
                return getFirstName();
            }
          if (name.equals(StudentLogPeer.MIDDLENAME))
        {
                return getMiddleName();
            }
          if (name.equals(StudentLogPeer.LASTNAME))
        {
                return getLastName();
            }
          if (name.equals(StudentLogPeer.SEX))
        {
                return getSex();
            }
          if (name.equals(StudentLogPeer.BIRTHDATE))
        {
                return getBirthDate();
            }
          if (name.equals(StudentLogPeer.CIVILSTATUS))
        {
                return new Integer(getCivilStatus());
            }
          if (name.equals(StudentLogPeer.RESIDENTIALADDRESS))
        {
                return getResidentialAddress();
            }
          if (name.equals(StudentLogPeer.COLLEGEADDRESS))
        {
                return getCollegeAddress();
            }
          if (name.equals(StudentLogPeer.FATHER))
        {
                return getFather();
            }
          if (name.equals(StudentLogPeer.MOTHER))
        {
                return getMother();
            }
          if (name.equals(StudentLogPeer.GUARDIAN))
        {
                return getGuardian();
            }
          if (name.equals(StudentLogPeer.GUARDIANCONTACTNUMBER))
        {
                return getGuardianContactNumber();
            }
          if (name.equals(StudentLogPeer.GUARDIANADDRESS))
        {
                return getGuardianAddress();
            }
          if (name.equals(StudentLogPeer.GUARDIANRELATION))
        {
                return getGuardianRelation();
            }
          if (name.equals(StudentLogPeer.GUARDIANEMAIL))
        {
                return getGuardianEmail();
            }
          if (name.equals(StudentLogPeer.ISRGEP))
        {
                return new Integer(getIsRGEP());
            }
          if (name.equals(StudentLogPeer.ZIPCODE))
        {
                return new Integer(getZipcode());
            }
          if (name.equals(StudentLogPeer.TELEPHONENUMBER))
        {
                return getTelephoneNumber();
            }
          if (name.equals(StudentLogPeer.CELLPHONENUMBER))
        {
                return getCellphoneNumber();
            }
          if (name.equals(StudentLogPeer.HIGHSCHOOL))
        {
                return getHighSchool();
            }
          if (name.equals(StudentLogPeer.HIGHSCHOOLGRADE))
        {
                return new Double(getHighSchoolGrade());
            }
          if (name.equals(StudentLogPeer.EMAIL))
        {
                return getEmail();
            }
          if (name.equals(StudentLogPeer.STFAPBRACKET))
        {
                return new Integer(getSTFAPBracket());
            }
          if (name.equals(StudentLogPeer.SIGNATURE))
        {
                return getSignature();
            }
          if (name.equals(StudentLogPeer.ADVISER))
        {
                return getAdviser();
            }
          if (name.equals(StudentLogPeer.CITIZENSHIP))
        {
                return new Integer(getCitizenship());
            }
          if (name.equals(StudentLogPeer.COUNTRY))
        {
                return getCountry();
            }
          if (name.equals(StudentLogPeer.CURRICULUMCODE))
        {
                return getCurriculumCode();
            }
          if (name.equals(StudentLogPeer.PHOTO))
        {
                return getPhoto();
            }
          return null;
    }

    /**
     * Retrieves a field from the object by Position as specified
     * in the xml schema.  Zero-based.
     *
     * @param pos position in xml schema
     * @return value
     */
    public Object getByPosition(int pos)
    {
            if (pos == 0)
        {
                return new Integer(getStudentLogId());
            }
              if (pos == 1)
        {
                return new Integer(getAction());
            }
              if (pos == 2)
        {
                return new Integer(getYear());
            }
              if (pos == 3)
        {
                return new Integer(getMonth());
            }
              if (pos == 4)
        {
                return new Integer(getDay());
            }
              if (pos == 5)
        {
                return new Integer(getHour());
            }
              if (pos == 6)
        {
                return getMinute();
            }
              if (pos == 7)
        {
                return getSecond();
            }
              if (pos == 8)
        {
                return getStudentNumber();
            }
              if (pos == 9)
        {
                return getFirstName();
            }
              if (pos == 10)
        {
                return getMiddleName();
            }
              if (pos == 11)
        {
                return getLastName();
            }
              if (pos == 12)
        {
                return getSex();
            }
              if (pos == 13)
        {
                return getBirthDate();
            }
              if (pos == 14)
        {
                return new Integer(getCivilStatus());
            }
              if (pos == 15)
        {
                return getResidentialAddress();
            }
              if (pos == 16)
        {
                return getCollegeAddress();
            }
              if (pos == 17)
        {
                return getFather();
            }
              if (pos == 18)
        {
                return getMother();
            }
              if (pos == 19)
        {
                return getGuardian();
            }
              if (pos == 20)
        {
                return getGuardianContactNumber();
            }
              if (pos == 21)
        {
                return getGuardianAddress();
            }
              if (pos == 22)
        {
                return getGuardianRelation();
            }
              if (pos == 23)
        {
                return getGuardianEmail();
            }
              if (pos == 24)
        {
                return new Integer(getIsRGEP());
            }
              if (pos == 25)
        {
                return new Integer(getZipcode());
            }
              if (pos == 26)
        {
                return getTelephoneNumber();
            }
              if (pos == 27)
        {
                return getCellphoneNumber();
            }
              if (pos == 28)
        {
                return getHighSchool();
            }
              if (pos == 29)
        {
                return new Double(getHighSchoolGrade());
            }
              if (pos == 30)
        {
                return getEmail();
            }
              if (pos == 31)
        {
                return new Integer(getSTFAPBracket());
            }
              if (pos == 32)
        {
                return getSignature();
            }
              if (pos == 33)
        {
                return getAdviser();
            }
              if (pos == 34)
        {
                return new Integer(getCitizenship());
            }
              if (pos == 35)
        {
                return getCountry();
            }
              if (pos == 36)
        {
                return getCurriculumCode();
            }
              if (pos == 37)
        {
                return getPhoto();
            }
              return null;
    }
     
    /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.
     *
     * @throws Exception
     */
    public void save() throws Exception
    {
          save(StudentLogPeer.getMapBuilder()
                .getDatabaseMap().getName());
      }

    /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.
       * Note: this code is here because the method body is
     * auto-generated conditionally and therefore needs to be
     * in this file instead of in the super class, BaseObject.
       *
     * @param dbName
     * @throws TorqueException
     */
    public void save(String dbName) throws TorqueException
    {
        Connection con = null;
          try
        {
            con = Transaction.begin(dbName);
            save(con);
            Transaction.commit(con);
        }
        catch(TorqueException e)
        {
            Transaction.safeRollback(con);
            throw e;
        }
      }

      /** flag to prevent endless save loop, if this object is referenced
        by another object which falls in this transaction. */
    private boolean alreadyInSave = false;
      /**
     * Stores the object in the database.  If the object is new,
     * it inserts it; otherwise an update is performed.  This method
     * is meant to be used as part of a transaction, otherwise use
     * the save() method and the connection details will be handled
     * internally
     *
     * @param con
     * @throws TorqueException
     */
    public void save(Connection con) throws TorqueException
    {
          if (!alreadyInSave)
        {
            alreadyInSave = true;


  
            // If this object has been modified, then save it to the database.
            if (isModified())
            {
                if (isNew())
                {
                    StudentLogPeer.doInsert((StudentLog) this, con);
                    setNew(false);
                }
                else
                {
                    StudentLogPeer.doUpdate((StudentLog) this, con);
                }
            }

                      alreadyInSave = false;
        }
      }


                    
      /**
     * Set the PrimaryKey using ObjectKey.
     *
     * @param  studentLogId ObjectKey
     */
    public void setPrimaryKey(ObjectKey key)
        
    {
            setStudentLogId(((NumberKey) key).intValue());
        }

    /**
     * Set the PrimaryKey using a String.
     *
     * @param key
     */
    public void setPrimaryKey(String key) 
    {
            setStudentLogId(Integer.parseInt(key));
        }

  
    /**
     * returns an id that differentiates this object from others
     * of its class.
     */
    public ObjectKey getPrimaryKey()
    {
          return SimpleKey.keyFor(getStudentLogId());
      }

 

    /**
     * Makes a copy of this object.
     * It creates a new object filling in the simple attributes.
       * It then fills all the association collections and sets the
     * related objects to isNew=true.
       */
      public StudentLog copy() throws TorqueException
    {
        return copyInto(new StudentLog());
    }
  
    protected StudentLog copyInto(StudentLog copyObj) throws TorqueException
    {
          copyObj.setStudentLogId(studentLogId);
          copyObj.setAction(action);
          copyObj.setYear(year);
          copyObj.setMonth(month);
          copyObj.setDay(day);
          copyObj.setHour(hour);
          copyObj.setMinute(minute);
          copyObj.setSecond(second);
          copyObj.setStudentNumber(studentNumber);
          copyObj.setFirstName(firstName);
          copyObj.setMiddleName(middleName);
          copyObj.setLastName(lastName);
          copyObj.setSex(sex);
          copyObj.setBirthDate(birthDate);
          copyObj.setCivilStatus(civilStatus);
          copyObj.setResidentialAddress(residentialAddress);
          copyObj.setCollegeAddress(collegeAddress);
          copyObj.setFather(father);
          copyObj.setMother(mother);
          copyObj.setGuardian(guardian);
          copyObj.setGuardianContactNumber(guardianContactNumber);
          copyObj.setGuardianAddress(guardianAddress);
          copyObj.setGuardianRelation(guardianRelation);
          copyObj.setGuardianEmail(guardianEmail);
          copyObj.setIsRGEP(isRGEP);
          copyObj.setZipcode(zipcode);
          copyObj.setTelephoneNumber(telephoneNumber);
          copyObj.setCellphoneNumber(cellphoneNumber);
          copyObj.setHighSchool(highSchool);
          copyObj.setHighSchoolGrade(highSchoolGrade);
          copyObj.setEmail(email);
          copyObj.setSTFAPBracket(sTFAPBracket);
          copyObj.setSignature(signature);
          copyObj.setAdviser(adviser);
          copyObj.setCitizenship(citizenship);
          copyObj.setCountry(country);
          copyObj.setCurriculumCode(curriculumCode);
          copyObj.setPhoto(photo);
  
                    copyObj.setStudentLogId(0);
                                                                                                                                                                                                                                          
        
        return copyObj;
    }

    /**
     * returns a peer instance associated with this om.  Since Peer classes
     * are not to have any instance attributes, this method returns the
     * same instance for all member of this class. The method could therefore
     * be static, but this would prevent one from overriding the behavior.
     */
    public StudentLogPeer getPeer()
    {
        return peer;
    }

    public String toString()
    {
        StringBuffer str = new StringBuffer();
        str.append("StudentLog:\n");
        str.append("StudentLogId = ")
           .append(getStudentLogId())
           .append("\n");
        str.append("Action = ")
           .append(getAction())
           .append("\n");
        str.append("Year = ")
           .append(getYear())
           .append("\n");
        str.append("Month = ")
           .append(getMonth())
           .append("\n");
        str.append("Day = ")
           .append(getDay())
           .append("\n");
        str.append("Hour = ")
           .append(getHour())
           .append("\n");
        str.append("Minute = ")
           .append(getMinute())
           .append("\n");
        str.append("Second = ")
           .append(getSecond())
           .append("\n");
        str.append("StudentNumber = ")
           .append(getStudentNumber())
           .append("\n");
        str.append("FirstName = ")
           .append(getFirstName())
           .append("\n");
        str.append("MiddleName = ")
           .append(getMiddleName())
           .append("\n");
        str.append("LastName = ")
           .append(getLastName())
           .append("\n");
        str.append("Sex = ")
           .append(getSex())
           .append("\n");
        str.append("BirthDate = ")
           .append(getBirthDate())
           .append("\n");
        str.append("CivilStatus = ")
           .append(getCivilStatus())
           .append("\n");
        str.append("ResidentialAddress = ")
           .append(getResidentialAddress())
           .append("\n");
        str.append("CollegeAddress = ")
           .append(getCollegeAddress())
           .append("\n");
        str.append("Father = ")
           .append(getFather())
           .append("\n");
        str.append("Mother = ")
           .append(getMother())
           .append("\n");
        str.append("Guardian = ")
           .append(getGuardian())
           .append("\n");
        str.append("GuardianContactNumber = ")
           .append(getGuardianContactNumber())
           .append("\n");
        str.append("GuardianAddress = ")
           .append(getGuardianAddress())
           .append("\n");
        str.append("GuardianRelation = ")
           .append(getGuardianRelation())
           .append("\n");
        str.append("GuardianEmail = ")
           .append(getGuardianEmail())
           .append("\n");
        str.append("IsRGEP = ")
           .append(getIsRGEP())
           .append("\n");
        str.append("Zipcode = ")
           .append(getZipcode())
           .append("\n");
        str.append("TelephoneNumber = ")
           .append(getTelephoneNumber())
           .append("\n");
        str.append("CellphoneNumber = ")
           .append(getCellphoneNumber())
           .append("\n");
        str.append("HighSchool = ")
           .append(getHighSchool())
           .append("\n");
        str.append("HighSchoolGrade = ")
           .append(getHighSchoolGrade())
           .append("\n");
        str.append("Email = ")
           .append(getEmail())
           .append("\n");
        str.append("STFAPBracket = ")
           .append(getSTFAPBracket())
           .append("\n");
        str.append("Signature = ")
           .append(getSignature())
           .append("\n");
        str.append("Adviser = ")
           .append(getAdviser())
           .append("\n");
        str.append("Citizenship = ")
           .append(getCitizenship())
           .append("\n");
        str.append("Country = ")
           .append(getCountry())
           .append("\n");
        str.append("CurriculumCode = ")
           .append(getCurriculumCode())
           .append("\n");
        str.append("Photo = ")
           .append(getPhoto())
           .append("\n");
        return(str.toString());
    }
}
